package com.ruoyi.system.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.Date;

/**
 * 实验管理对象 Experiment
 * 
 * @author gw
 * @date 2025-01-08
 */
@Document(indexName = "experiment")
public class Experiment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 实验ID */
    @Id
    private Long experimentId;

    /** 科研项目ID */
    @Excel(name = "科研项目ID")
    private Long projectId;


//   科研项目名称
    private String projectName;

    /** 实验名称 */
    @Excel(name = "实验名称")
    private String experimentName;

    /** 负责人 */
    @Excel(name = "负责人")
    private String principalInvestigator;

    /** 实验开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实验开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 实验结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实验结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 实验状态（如未开始、进行中、已完成等） */
    @Excel(name = "实验状态", readConverterExp = "如=未开始、进行中、已完成等")
    private Long status;

    /** 删除人 */
    private String deleteBy;

    /** 删除时间 */
    private Date deleteTime;

    /** 版本号 */
    private Long version;

    /** 删除标记 */
    private Integer delFlag;

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public void setExperimentId(Long experimentId)
    {
        this.experimentId = experimentId;
    }

    public Long getExperimentId() 
    {
        return experimentId;
    }
    public void setProjectId(Long projectId) 
    {
        this.projectId = projectId;
    }

    public Long getProjectId() 
    {
        return projectId;
    }
    public void setExperimentName(String experimentName) 
    {
        this.experimentName = experimentName;
    }

    public String getExperimentName() 
    {
        return experimentName;
    }
    public void setPrincipalInvestigator(String principalInvestigator) 
    {
        this.principalInvestigator = principalInvestigator;
    }

    public String getPrincipalInvestigator() 
    {
        return principalInvestigator;
    }
    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }
    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setDeleteBy(String deleteBy) 
    {
        this.deleteBy = deleteBy;
    }

    public String getDeleteBy() 
    {
        return deleteBy;
    }
    public void setDeleteTime(Date deleteTime) 
    {
        this.deleteTime = deleteTime;
    }

    public Date getDeleteTime() 
    {
        return deleteTime;
    }
    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }
    public void setDelFlag(Integer delFlag) 
    {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("experimentId", getExperimentId())
            .append("projectId", getProjectId())
            .append("experimentName", getExperimentName())
            .append("principalInvestigator", getPrincipalInvestigator())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("deleteBy", getDeleteBy())
            .append("deleteTime", getDeleteTime())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
